<?php	
	
	function pageHeader() {
		echo "<html>\n";
		echo "	<head>\n";
		echo "		<meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\">\n";
		echo "		<title>HPBerry Admin Login</title>\n";
		echo " 			<link rel=\"stylesheet\" href=\"admin-style.css\" type=\"text/css\">\n";
		echo " </head>\n";
		echo " <body>\n";
		echo "	<div id=\"container\">\n";
		echo " 	<div id=\"header\">\n";
		echo "	</div>\n";
	}
		
	function loginNavigation() {
		echo "   <div id=\"nav\">\n";
		echo " 		<ul>\n";
		echo "      	<li><a href=\"login.php\" class=\"selected\" title=\"Login\">Login</a></li>\n"; 
		echo " 		</ul>\n";
		echo "  </div>\n";
	}
	
	function adminNavigation() {
		echo '  <div id="nav">'."\n";
		echo " 		<ul>\n";
		echo '      	<li><a href="portal.php" class="selected" title="Welcome">Portal Home</a></li>'."\n";
		echo '      	<li><a href="author.php" class="selected" title="Write a new article">Publish an Article</a></li>'."\n";
		echo '          <li><a href="accounts.php" class="selected" title="Create Accounts">Create Account</a></li>'."\n";
		echo '          <li><a href="remove.php" class="selected" title="Remove Accounts">Remove Account</a></li>'."\n";
		echo '          <li><a href="security.php" class="selected" title="View Log Files">Security</a></li>'."\n"; 
		echo '          <li><a href="logout.php" class="selected" title="Logout">Logout</a></li>'."\n"; 
		echo " 		</ul>\n";
		echo "  </div>\n";
	}
	
	function contentHeader() {
		echo '  <div id="content">'."\n";
		echo '  <div id="page">'."\n";
	}
	
	function connectToDatabase() {
		$sqlConnection = mysql_connect("localhost", "aaronthebard", "StrongP@ssw0rd");
		if (!$sqlConnection)
			die("<html>OMFG Error: Unable to connect to SQL server!</html>");
		return $sqlConnection;
	}
	
	function contentFooter($message) {
		echo "    </div>\n";
		echo '    <div class="clear">'."\n";
		echo "    </div>\n";
		echo "   </div>\n";
		echo '  <div id="footer">'."\n";
		echo "    HPBerry - ".$message;
		echo "  </div>\n";
		echo "  </div>\n";
		echo " </body></br></br>\n";
		echo "</html>\n";
	}
?>